package com.ppl.server.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.Multimap;
import com.google.inject.Key;
import org.bson.types.ObjectId;

import java.util.Collection;
import java.util.List;

/**
 * User: Vincent
 * Date: 11/13/12
 * Time: 10:09 AM
 */

public class User extends DbEntity {
    @JsonProperty(value = "username")
    private String name;
    private String password;
    private String language;
    private Collection<SocialIdentity> socialIdentities;
    private Collection<String> friendIds;
    private String email;
    private Multimap<String,List<String>> petImages;
    private Key<Pet> pets;
    private String firstnameOrFullname;
    private String lastName;

    public String getFirstnameOrFullname() {
        return firstnameOrFullname;
    }

    public void setFirstnameOrFullname(String firstnameOrFullname) {
        this.firstnameOrFullname = firstnameOrFullname;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    @Override
    public ObjectId getId() {
        return super.getId();    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public void setId(ObjectId id) {
        super.setId(id);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public String getIdentifier() {
        return super.getIdentifier();    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public void setIdentifier(String identifier) {
        super.setIdentifier(identifier);    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public long getCreationTimestamp() {
        return super.getCreationTimestamp();    //To change body of overridden methods use File | Settings | File Templates.
    }

    @Override
    public void setCreationTimestamp(long creationTimestamp) {
        super.setCreationTimestamp(creationTimestamp);    //To change body of overridden methods use File | Settings | File Templates.
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public Collection<String> getFriendIds() {
        return friendIds;
    }

    public void setFriendIds(Collection<String> friendIds) {
        this.friendIds = friendIds;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Multimap<String, List<String>> getPetImages() {
        return petImages;
    }

    public void setPetImages(Multimap<String, List<String>> petImages) {
        this.petImages = petImages;
    }

    public Key<Pet> getPets() {
        return pets;
    }

    public void setPets(Key<Pet> pets) {
        this.pets = pets;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Collection<SocialIdentity> getSocialIdentities() {
        return socialIdentities;
    }

    public void setSocialIdentities(Collection<SocialIdentity> socialIdentities) {
        this.socialIdentities = socialIdentities;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", language='" + language + '\'' +
                ", socialIdentities=" + socialIdentities +
                ", friendIds=" + friendIds +
                ", email='" + email + '\'' +
                ", petImages=" + petImages +
                ", pets=" + pets +
                ", firstnameOrFullname='" + firstnameOrFullname + '\'' +
                ", lastName='" + lastName + '\'' +
                '}';
    }
}
